package com.zxx.pattern.observerPattern.observer_Z;

/**
 * @author zxx on 2021/3/9
 */
public class ObserverTest {

    public static void main(String[] args) {
        WatchedCounter counter = new WatchedCounter();
        Watcher1 watcher1 = new Watcher1();
        Watcher2 watcher2 = new Watcher2();

        counter.addObserver(watcher1);
        counter.addObserver(watcher2);

        counter.countdown(10);
    }

}
